/**
 * Created by 芋道源码
 *
 * 数据字典工具类
 */

export const DICT_TYPE = {

  // ========== MALL - 交易模块 ==========
  BROKERAGE_BANK_NAME: 'brokerage_bank_name', // 佣金提现银行
  BROKERAGE_WITHDRAW_TYPE: 'brokerage_withdraw_type', // 佣金提现类型

}

// 配置中心信息key
export const CENTER_CONFIG_KEY = {
  APPLICATION_CONFIG: {
    name: "网站配置",
    value: "application.setting",
    demoData: {
      "applicationConfig": {
        "appHost": "https://school.thisforyou.cn:1443", // 回调地址
        "appLogo": '' // 网站logo
      },
      "enableCustomer": {
        "enableCustomer": true // 是否启用客服
      },
      "createOrderModel": {
        "createOrderModel": "BUY" // 下单模式
        , "optionalValue": [
          {
            "name": "发布模式",
            "value": "PUB",
            "enable": true,
            "remark": ""
          },
          {
            "name": "购买模式",
            "value": "BUY",
            "enable": true,
            "remark": ""
          }
        ]
      }
    }
  }
}

// 字典KEY
export const DIC_TYPE_LIST = [
  {
    "name": "订单状态",
    "value": "order_state"
  },
  {
    "name": "结算状态",
    "value": "settlement_state"
  }
  , {
    "name": "支付方式",
    "value": "pay_channel"
  }
  , {
    "name": "收益类型",
    "value": "income_type"
  }
  , {
    "name": "用户提现状态",
    "value": "settle_state"
  }
]

// 管理员权限
export const ADMIN_PERMISSION = [
  {
    "name": "认证审核",
    "value": "student_audit"
  },
  {
    "name": "会员管理",
    "value": "student_manager"
  },
  {
    "name": "订单发布",
    "value": "publish"
  },
  {
    "name": "接单",
    "value": "take_order"
  },
  {
    "name": "提现",
    "value": "take_order"
  }
]

/**
 * 佣金提现类型枚举
 */
export const BrokerageWithdrawTypeEnum = {
  WALLET: {
    type: 1,
    name: '钱包',
    icon: 'icon-qiandai'
  },
  BANK: {
    type: 2,
    name: '银行卡',
    icon: 'icon-yinhangqia'
  },
  WECHAT: {
    type: 3,
    name: '微信',
    icon: 'icon-weixin2'
  },
  ALIPAY: {
    type: 4,
    name: '支付宝',
    icon: 'icon-icon34'
  }
}

/** 终端的枚举 */
export const TerminalEnum = {
  WECHAT_MINI_PROGRAM: {
    terminal: 'MA',
    name: '微信小程序'
  },
  WECHAT_WAP: {
    terminal: 'MP',
    name: '微信公众号'
  },
  H5: {
    terminal: 'H5',
    name: 'H5 网页'
  },
  APP: {
    terminal: 'APP',
    name: '手机 App'
  }
}
//
// export const TerminalEnum = {
//   WECHAT_MINI_PROGRAM: {
//     terminal: 10,
//     name: '微信小程序'
//   },
//   WECHAT_WAP: {
//     terminal: 11,
//     name: '微信公众号'
//   },
//   H5: {
//     terminal: 20,
//     name: 'H5 网页'
//   },
//   APP: {
//     terminal: 31,
//     name: '手机 App'
//   }
// }

/** 协议 */
export const AgreementEnum = {
  aboutMe: {
    name: '关于我们',
    code: '100000'
  }
  , pushTask: {
    name: '发布任务协议声明',
    code: '200000'
  }, question: {
    name: '问题帮助',
    code: '300000'
  }
}

export const PermissionsEnum = {
  PUBLISH: {
    name: '发布订单',
    code: 'publish'
  }
  , TAKE_ORDER: {
    name: '接单',
    code: 'take_order'
  }, SETTLE: {
    name: '提现',
    code: 'settle'
  }
}

